package com.yida.gwj.scene.expend.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yida.common.core.utils.DateUtils;
import com.yida.gwj.scene.expend.domain.GwjSceneExpendBusinessBuild;
import com.yida.gwj.scene.expend.mapper.GwjSceneExpendBusinessBuildMapper;
import com.yida.gwj.scene.expend.service.IGwjSceneExpendBusinessBuildService;

/**
 * 业务楼栋（旧支出模块）Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-14
 */
@Service
public class GwjSceneExpendBusinessBuildServiceImpl implements IGwjSceneExpendBusinessBuildService {
    @Autowired
    private GwjSceneExpendBusinessBuildMapper gwjSceneExpendBusinessBuildMapper;

    /**
     * 查询业务楼栋（旧支出模块）
     * 
     * @param bizBuildId 业务楼栋（旧支出模块）主键
     * @return 业务楼栋（旧支出模块）
     */
    @Override
    public GwjSceneExpendBusinessBuild selectGwjSceneExpendBusinessBuildByBizBuildId(Long bizBuildId) {
        return gwjSceneExpendBusinessBuildMapper.selectGwjSceneExpendBusinessBuildByBizBuildId(bizBuildId);
    }

    /**
     * 查询业务楼栋（旧支出模块）列表
     * 
     * @param gwjSceneExpendBusinessBuild 业务楼栋（旧支出模块）
     * @return 业务楼栋（旧支出模块）
     */
    @Override
    public List<GwjSceneExpendBusinessBuild> selectGwjSceneExpendBusinessBuildList(GwjSceneExpendBusinessBuild gwjSceneExpendBusinessBuild) {
        return gwjSceneExpendBusinessBuildMapper.selectGwjSceneExpendBusinessBuildList(gwjSceneExpendBusinessBuild);
    }

    /**
     * 新增业务楼栋（旧支出模块）
     * 
     * @param gwjSceneExpendBusinessBuild 业务楼栋（旧支出模块）
     * @return 结果
     */
    @Override
    public int insertGwjSceneExpendBusinessBuild(GwjSceneExpendBusinessBuild gwjSceneExpendBusinessBuild) {
        gwjSceneExpendBusinessBuild.setCreateTime(DateUtils.getNowDate());
        return gwjSceneExpendBusinessBuildMapper.insertGwjSceneExpendBusinessBuild(gwjSceneExpendBusinessBuild);
    }

    /**
     * 修改业务楼栋（旧支出模块）
     * 
     * @param gwjSceneExpendBusinessBuild 业务楼栋（旧支出模块）
     * @return 结果
     */
    @Override
    public int updateGwjSceneExpendBusinessBuild(GwjSceneExpendBusinessBuild gwjSceneExpendBusinessBuild) {
        gwjSceneExpendBusinessBuild.setUpdateTime(DateUtils.getNowDate());
        return gwjSceneExpendBusinessBuildMapper.updateGwjSceneExpendBusinessBuild(gwjSceneExpendBusinessBuild);
    }

    /**
     * 批量删除业务楼栋（旧支出模块）
     * 
     * @param bizBuildIds 需要删除的业务楼栋（旧支出模块）主键
     * @return 结果
     */
    @Override
    public int deleteGwjSceneExpendBusinessBuildByBizBuildIds(Long[] bizBuildIds) {
        return gwjSceneExpendBusinessBuildMapper.deleteGwjSceneExpendBusinessBuildByBizBuildIds(bizBuildIds);
    }

    /**
     * 删除业务楼栋（旧支出模块）信息
     * 
     * @param bizBuildId 业务楼栋（旧支出模块）主键
     * @return 结果
     */
    @Override
    public int deleteGwjSceneExpendBusinessBuildByBizBuildId(Long bizBuildId) {
        return gwjSceneExpendBusinessBuildMapper.deleteGwjSceneExpendBusinessBuildByBizBuildId(bizBuildId);
    }

    /**
     * 根据楼栋标识码查询业务楼栋信息
     * 
     * @param buildCodes 楼栋标识码组
     * @return
     */
    @Override
    public List<GwjSceneExpendBusinessBuild> selectGwjSceneExpendBusinessBuildListByBuildCodes(String[] buildCodes) {
        return gwjSceneExpendBusinessBuildMapper.selectGwjSceneExpendBusinessBuildListByBuildCodes(buildCodes);
    }

    /**
     * 删除业务楼栋（旧支出模块）信息
     * 
     * @param bizBuildId 业务楼栋（旧支出模块）主键
     * @return 结果
     */
    public int deleteGwjSceneExpendBusinessBuildByBizId(Long bizId) {
        return gwjSceneExpendBusinessBuildMapper.deleteGwjSceneExpendBusinessBuildByBizId(bizId);
    }
}
